﻿@using System.Web.UI.WebControls
@{ Layout = "~/Views/Shared/_Layout.cshtml"; }

@Html.DevExpress().Splitter(settings => {
    settings.Name = "ContentSplitter";
    settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
    settings.Height = System.Web.UI.WebControls.Unit.Percentage(100);
    settings.Styles.Pane.Paddings.Padding = System.Web.UI.WebControls.Unit.Pixel(0);
    settings.Styles.Pane.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);

    if (!string.IsNullOrEmpty(WebSecurity.CurrentUserName)) {
        settings.Panes.Add(subpane =>
        {
            subpane.Name = "ContentLeft";
            subpane.PaneStyle.CssClass = "leftPane";
            subpane.ShowCollapseBackwardButton = DefaultBoolean.False;
            subpane.Size = System.Web.UI.WebControls.Unit.Pixel(250);
            subpane.PaneStyle.Paddings.Padding = System.Web.UI.WebControls.Unit.Pixel(1);
            subpane.SetContent(() =>
            {
                Html.RenderPartial("ContentLeftPartialView");
            });
        });
    }
    settings.Panes.Add(subpane => {
        subpane.Name = "ContentCenter";
		subpane.PaneStyle.CssClass = "contentPane";
        subpane.Separator.Visible = DefaultBoolean.True;
        subpane.ScrollBars = ScrollBars.Auto;
        subpane.Separator.SeparatorStyle.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
        subpane.Separator.SeparatorStyle.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
        subpane.SetContent(RenderBody().ToHtmlString());
    });

    //settings.Panes.Add(subpane => {
    //    subpane.Name = "ContentRight";
    //    subpane.PaneStyle.CssClass = "rightPane";
    //    subpane.Separator.Visible = DefaultBoolean.True;
    //    subpane.ShowCollapseForwardButton = DefaultBoolean.True;
    //    subpane.Size = System.Web.UI.WebControls.Unit.Pixel(280);
    //    subpane.Separator.SeparatorStyle.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
    //    subpane.Separator.SeparatorStyle.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
    //    subpane.PaneStyle.Paddings.Padding = System.Web.UI.WebControls.Unit.Pixel(1);
    //    subpane.SetContent(() => {
    //        Html.RenderPartial("ContentRightPartialView");
    //    });
    //});
}).GetHtml()